/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.asset.cti.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.asset.entity.AssetCti;
import com.fuyao.cloud.asset.vo.CtiImportVO;
import com.fuyao.cloud.common.core.util.R;
import org.springframework.validation.BindingResult;

import java.util.List;

/**
 * 资产分类管理
 *
 * @author liyue
 * @date 2021-11-17 17:29:32
 */
public interface AssetCtiService extends IService<AssetCti> {

	/**
	 * 查询资产分类树结构
	 *
	 * @param query 查询构造器
	 * @return 资产分类树结构
	 */
	List<Tree<Long>> selectTree(QueryWrapper<AssetCti> query);

	/**
	 * 查询资产分类
	 *
	 * @param query 查询构造器
	 * @return 资产分类集合
	 */
	List listCti(QueryWrapper<AssetCti> query);

	/**
	 * 导入资产分类信息
	 *
	 * @param excelVOList 导入列表
	 * @param bindingResult 绑定信息
	 * @return 导入信息
	 */
	R importCti(List<CtiImportVO> excelVOList, BindingResult bindingResult);
}
